package com.port.eleport.model.biz;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.port.eleport.model.base.IdEntity;
import com.port.eleport.model.plat.TMerchant;

/**
 * 买家
 * @author jameschen
 *
 */
@Entity
@Table(name = "biz_buyer", schema = "")
@DynamicInsert(true)
@DynamicUpdate(true)
public class TBuyer extends IdEntity {

	/**
	 * 账号（身份证）
	 */
	@Column(name="id_num")
	private String idNum;
	

	/**
	 * 真实姓名
	 */
	@Column(name="name_")
	private String name;	
	

	/**
	 * 手机号
	 */
	@Column(name="phone_")
	private String phone;
	
	/**
	 * 邮箱
	 */
	@Column(name="email_")
	private String email;
	
	/**
	 * 购物网站代码
	 */
	@Column(name="order_from")
	private String orderFrom;
	
	/**
	 * 购物网站账号
	 */
	@Column(name="accounts_")
	private String accounts;
	
	/**
	 * 身份证号
	 */
	@Column(name="id_card")
	private String idCard;
	
	/**
	 * 买家地址
	 */
	@Column(name="address_")
	private String address;
	
	
	/**
	 * 身份证上传图
	 */
	@Column(name="id_card_img")
	private String idCardImg;
	
	
	/**
	 * 商家
	 */
	@ManyToOne
	@JoinColumn(name = "merchant_id")
	private TMerchant merchant;


	public String getIdNum() {
		return idNum;
	}


	public void setIdNum(String idNum) {
		this.idNum = idNum;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getPhone() {
		return phone;
	}


	public void setPhone(String phone) {
		this.phone = phone;
	}


	public String getEmail() {
		return email;
	}


	public void setEmail(String email) {
		this.email = email;
	}


	public String getOrderFrom() {
		return orderFrom;
	}


	public void setOrderFrom(String orderFrom) {
		this.orderFrom = orderFrom;
	}


	public String getAccounts() {
		return accounts;
	}


	public void setAccounts(String accounts) {
		this.accounts = accounts;
	}


	public String getIdCard() {
		return idCard;
	}


	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}


	public String getAddress() {
		return address;
	}


	public void setAddress(String address) {
		this.address = address;
	}


	public String getIdCardImg() {
		return idCardImg;
	}


	public void setIdCardImg(String idCardImg) {
		this.idCardImg = idCardImg;
	}


	public TMerchant getMerchant() {
		return merchant;
	}


	public void setMerchant(TMerchant merchant) {
		this.merchant = merchant;
	}
	
	
}
